﻿Public Class mainpage1
    Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		Try
			If Not Page.IsPostBack Then
				If GlobalApp.Authen IsNot Nothing Then
					Dim entSumInfo As Entity.SumInfoItem = BL.Officer.LoadSummaryInfo(GlobalApp.Authen.offcier_id)
					Me.Label1.Text = Common.Utility.FormatAppId(GlobalApp.Authen.user_id)
					Me.Label2.Text = entSumInfo.officer_firstname_tha & " " & entSumInfo.officer_lastname_tha
					Me.Label3.Text = entSumInfo.officer_status
					Me.Label4.Text = entSumInfo.countchildlv1
					Me.Label5.Text = entSumInfo.countchildlv2
					Me.Label6.Text = entSumInfo.countchildlv3
					Me.lblL4.Text = entSumInfo.countchildlv4
					Me.lblL5.Text = entSumInfo.countchildlv5
					Me.Label7.Text = entSumInfo.lrv
					Me.Label8.Text = entSumInfo.rrv
					Me.lblMySelfRV.Text = entSumInfo.myself_rv
					Me.Label9.Text = Common.UtilityDateTime.ConvertDateToString(entSumInfo.OFFCIER_MEMBER_DATE.AddYears(543))
					Me.Label10.Text = Common.UtilityDateTime.ConvertDateToString(entSumInfo.OFFCIER_EXPIRD_DATE.AddYears(543))
					Me.Label11.Text = Common.UtilityDateTime.ConvertDateToString(entSumInfo.LAST_REGISTER_DATE.AddYears(543))
				End If
			End If

			'กลับมาหน้า main ต้องเคลียร์ทิ้ง
			Session.Remove(GlobalApp.SessionNameRegister)
		Catch
		End Try
	End Sub

End Class